home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / www / src / midaswww-1.0 / SGMLTextP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-16  |  4.2 KB  |  122 lines

  1. /*==================================================================*/
  2. /*                                                                  */
  3. /* SGMLTextObject                                                   */
  4. /*                                                                  */
  5. /* T.Johnson - (TonyJ@Slacvx.Slac.Stanford.Edu)           June.92   */
  6. /*                                                                  */
  7. /* Defines a text segment for the SGMLHyper widget                  */
  8. /*                                                                  */
  9. /*==================================================================*/
  10.  
  11. #ifndef SGMLTEXTP_H
  12. #define SGMLTEXTP_H
  13.  
  14. #include "SGMLText.h"
  15.  
  16. /* SGMLText class */
  17.  
  18. typedef void    (*ComputeSizeProc)();
  19. typedef Boolean (*AdjustSizeProc)();
  20. typedef void    (*AdjustPositionProc)();
  21. typedef void    (*ExposeProc)();
  22. typedef void    (*ActivateProc)();
  23. typedef void    (*HiliteProc)();
  24. typedef Widget  (*ContainsProc)();
  25. typedef void    (*CallCreateCallbackProc)();
  26. typedef void    (*CallMapCallbackProc)();
  27. typedef void    (*MakeVisibleProc)();
  28.  
  29. #define SGMLInheritComputeSize        ((ComputeSizeProc)        _XtInherit) 
  30. #define SGMLInheritAdjustSize         ((AdjustSizeProc)         _XtInherit) 
  31. #define SGMLInheritAdjustPosition     ((AdjustPositionProc)     _XtInherit) 
  32. #define SGMLInheritExpose             ((ExposeProc)             _XtInherit) 
  33. #define SGMLInheritActivate           ((ActivateProc)           _XtInherit) 
  34. #define SGMLInheritHilite             ((HiliteProc)             _XtInherit) 
  35. #define SGMLInheritContains           ((ContainsProc)           _XtInherit) 
  36. #define SGMLInheritCallCreateCallback ((CallCreateCallbackProc) _XtInherit) 
  37. #define SGMLInheritCallMapCallback    ((CallMapCallbackProc)    _XtInherit) 
  38. #define SGMLInheritMakeVisible        ((MakeVisibleProc)        _XtInherit) 
  39.  
  40. typedef struct _SGMLTextClassPart{
  41.  
  42.    ComputeSizeProc        compute_size;
  43.    AdjustSizeProc         adjust_size;
  44.    AdjustPositionProc     adjust_position;
  45.    ExposeProc             expose;
  46.    ActivateProc           activate;
  47.    HiliteProc             hilite;
  48.    ContainsProc           contains;
  49.    CallCreateCallbackProc call_create_callback;
  50.    CallMapCallbackProc    call_map_callback;
  51.    MakeVisibleProc        make_visible;
  52.    XtPointer              extension;
  53.  
  54. } SGMLTextClassPart;
  55.  
  56. typedef struct _SGMLTextClassRec{
  57.  
  58.     ObjectClassPart     object_class;
  59.     SGMLTextClassPart   sgml_text_class;
  60.  
  61. } SGMLTextClassRec, *SGMLTextObjectClass;
  62.  
  63. extern SGMLTextClassRec sGMLTextClassRec;
  64.  
  65. typedef struct _SGMLRendition {
  66.  
  67.     Pixel               color;
  68.     Boolean             outline;                 
  69.     int                 underline;
  70.     Dimension           underline_height;
  71.     XFontStruct         *font;
  72.  
  73. } SGMLRendition;
  74.  
  75. typedef struct _SGMLTextPart {
  76.  
  77.     String              text;    /* pointer to text */
  78.     String              param;   /* pointer to parameters */
  79.     int                 length;         /* length of text */
  80.     int                 param_length ;  /* length of parameters */
  81.  
  82.     SGMLCoord           begin;
  83.     SGMLCoord           end;
  84.     Dimension           width,height;   /* Size of drawn text */
  85.     Position            margin;
  86.  
  87.     int                 right_margin;
  88.     int                 left_margin;
  89.     int                 right_indent;
  90.     int                 left_indent;
  91.     int                 paragraph_indent;
  92.     Dimension           space_before;
  93.     Dimension           space_after;
  94.     int                 break_before;
  95.     int                 break_after;  
  96.     int                 alignment;
  97.     Boolean             sensitive;
  98.     SGMLRendition       normal_rendition;
  99.     SGMLRendition       sensitive_rendition;
  100.     Dimension           ascent;
  101.     Dimension           depth;
  102.     Dimension           spacing;
  103.     Boolean             size_valid;
  104.     XtPointer           userdata;
  105.  
  106.     GC                  gc;
  107.     GC                  invert_gc;
  108.     Boolean             own_gcs;
  109.  
  110.     XtCallbackList      activate;       /* callback list */
  111.     XtCallbackList      create;         /* callback list */
  112.     XtCallbackList      map;            /* callback list */
  113.  
  114. } SGMLTextPart;
  115.  
  116. typedef struct _SGMLTextRec {
  117.     ObjectPart        object;
  118.     SGMLTextPart      sgml_text;
  119. } SGMLTextRec;
  120.  
  121. #endif SGMLTEXTP_H
  122.